#include <stdio.h>
#include <unistd.h>

int main()
{
    printf("hahahahaha,begin....\n");


#if 0
    getchar();
    printf("pid:%d\n",getpid());
    execl("/usr/bin/pwd","pwd",NULL);
    printf("execl failed\n");
#endif

#if 0
    char *argv[0];
    argv[0] = "ls";
    argv[1] = "l";
    argv[2] = "..";
    argv[3] = NULL;
    int ret = execv("/usr/bin/ls",argv);
    printf("execl failed,ret=%d\n",ret);
#endif

    char *argv[10];
    argv[0] = "ls";
    argv[1] = "-l";
    argv[2] = NULL;

    char *envp[10];
    envp[0] = "PATH=/usr/bin";
    envp[1] = NULL;
    int ret = execve("/usr/bin/ls",argv,envp);
    printf("execl failed,ret=%d\n",ret);
    return 0;
}